< 03 - Visualising and Analysing Networks | Home | 05 - Cliques and Communities >
In [13]:
from bookworm import *
%matplotlib inline
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = (15,12)
import pandas as pd
import numpy as np
import networkx as nx
In [15]:
graph_dict = chronological_network('data/raw/hp_philosophers_stone.txt',
n_sections=4,
cumulative=False)
fig = plt.figure()
for i in range(1, 5):
fig.add_subplot(2, 2, i)
nx.draw(graph_dict[i-1], node_size=70)
In [16]:
graph_dict = chronological_network('data/raw/hp_philosophers_stone.txt',
n_sections=4,
cumulative=True)
fig = plt.figure()
for i in range(1, 5):
fig.add_subplot(2, 2, i)
nx.draw(graph_dict[i-1], node_size=70)
In [17]:
graph_dict = chronological_network('data/raw/hp_philosophers_stone.txt',
n_sections=12,
cumulative=True)
fig = plt.figure()
for i in range(1, 13):
fig.add_subplot(3, 4, i)
nx.draw(graph_dict[i-1], node_size=70)
more to read and develop here and here
In the next notebook we'll come back to the idea of the cliques and communities that exist within social networks, and how they can be enumerated.
< 03 - Visualising and Analysing Networks | Home | 05 - Cliques and Communities >
In [ ]: